package collection2;


import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class NewFor1 {
    public static void main(String[] args) {
        Collection<String> c = new ArrayList();
        c.add("one");
        c.add("two");
        c.add("three");
        c.add("four");
        c.add("five");
        Iterator<String> it = c.iterator();
        for (Object obj :c) {
            System.out.println(obj);
        }

        String[]array = {"one","two","three","four","five"};
        for (String str:array) {
            System.out.println(str);
        }
    }
}
